#include "widget.h"
#include "ui_widget.h"
#include<QHBoxLayout>
#include<QVBoxLayout>
#include<QPushButton>
#include<QSpacerItem>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QHBoxLayout*layout=new QHBoxLayout(this);
    QPushButton*button1=new QPushButton("按钮1",this);
    QPushButton*button2=new QPushButton("按钮2",this);
    QSpacerItem*space=new QSpacerItem(20,40);

    layout->addWidget(button1);
    layout->addSpacerItem(space);
    layout->addWidget(button2);

}

Widget::~Widget()
{
    delete ui;
}

